{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "人口结构：包括人口总量、年龄分布、劳动年龄人口比例等。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "              2023年     2022年     2021年     2020年        2019年\n",
      "年末总人口(万人)  140967.0  141175.0  141260.0  141212.0  141008.0000\n",
      "男性人口(万人)    72032.0   72206.0   72311.0   72357.0   72039.0000\n",
      "女性人口(万人)    68935.0   68969.0   68949.0   68855.0   68969.0000\n",
      "城镇人口(万人)    93267.0   92071.0   91425.0   90220.0   88426.1168\n",
      "乡村人口(万人)    47700.0   49104.0   49835.0   50992.0   52581.8832\n"
     ]
    }
   ],
   "source": [
    "# 国家统计局通用接口\n",
    "import akshare as ak\n",
    "\n",
    "macro_china_nbs_nation_df = ak.macro_china_nbs_nation(kind=\"年度数据\", path=\"人口 > 总人口\", period=\"LAST5\")\n",
    "print(macro_china_nbs_nation_df)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
